<?

include_once "../conn.php";
include_once "../main.php";

?>

<script src="prototype.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function findSub(){
new Ajax.Request('findstate.php', {
	method: 'get',
	parameters:{						 
						 id: $F('country')
						},
	onLoading: function() { $('sub').update('Loading...') },
	onSuccess: function(transport){
						 if(transport.responseText){
						 	$('sub').update(transport.responseText);
						}
					}
				});
}
//-->
</SCRIPT>

<?

$category_list = job_categories("", "JobCategory", "");
$select_category = str_replace("<SELECT NAME=\"JobCategory\" >", "<select name=\"JobCategory\"><option value=\"\">All</option>", $category_list);

$career_level1 = career_level("", "");
$career_level = str_replace("<select name=\"careerlevel\">", "<select name=\"careerlevel\"><option value=\"\" selected>All</option>", $career_level1);

$q1 = "SELECT DISTINCT(position) FROM job_post";
$r1 = mysql_query($q1);


?>


<form action=JobSearch3.php method=post>
<table width=90% align=center cellspacing="5" class=BlackText>
<tr>
  <td colspan=2 align=left class=HeaderClass>&nbsp;</td>
</tr>
<tr>
	<td colspan=2 align=left class=HeaderClass>Search for a job</td>
</tr>

<tr>
  <td align=right>&nbsp;</td>
  <td>&nbsp;</td>
</tr>
<tr>
    <td align=left><b>Position: </b></td>
		<td><select name=position>
				<option value=" ">All</option>
<?php
while($a1 = mysql_fetch_array($r1)){
?>
		<option value="<?=$a1['position']?>"><?=$a1['position']?></option>
<?
}
?>
	</select>		</td>
</tr>


<tr>
	<td align=left><b>State/Province: </b></td>
	<td>
		<div id="sub">
			<select name=state>
				<option value=" ">Select</option>
<?php
foreach ($state as $key => $value){
?>
		<option value="<?=$value?>"><?=$value?></option>
<?
}
?>	
			</select>
		</div></td>	
</tr>

<tr>
	<td align=left><b>Country: </b></td>
	<td><?=select_country($country, "country");?></td>	
</tr>
		

<tr>
	<td align=left><b>Keyword: </b></td>
	<td><input type=text name=kw></td>
</tr>

<tr>
	<td align=left><b>Job's Target: </b></td>
	<td><?=$career_level?></td>
</tr>

<tr>
	<td align=left valign=top><b>Job Category: </b></td>
	<td>
		
<table border=0 width=100%>
	<tr>
		
<?php
$c = 0;
foreach ($categories AS $key => $value){		
?>		
	<td width=250><input type='checkbox' name='cat[]' value='<?=$value?>'><?=$value?></td>	
<?php
$c++;
		if($c==2){
			echo "</tr><tr>";
			$c = 0;
		}	
}
?>
</table></td>
</tr>

<tr>
	<td align=left><b>Search method: </b></td>
	<td>
	<input type=radio name=sm value=or checked>or
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type=radio name=sm value=and>and	</td>
</tr>

<tr>
	<td></td>
	<td><input type=submit name=s1 value=Search></td>
</tr>

<tr>
	<td colspan=2 align=left class=TNA> *If you leave blank some fields, they will not take part in the search process.</td>
</tr>
</table>
</form>

<table width="90%" border="0" align=center cellpadding="1" cellspacing="1" bgcolor="#DEE9F3" class=BlackText>
<tr>
	<td colspan=2 align=left bgcolor="#FFFFFF" class=HeaderClass><span class="title">Browse jobs by category</span></td>
</tr>

      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Accounting/Auditing">Accounting/Auditing</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Hospitality, Tourism">Hospitality, Tourism</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Administrative and Support Services">Administrative and Support Services</a></td>
				<td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Information Technology">Information Technology</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Advertising/Public Relations">Advertising/Public Relations</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Installation, Maintenance and Repair">Installation, Maintenance and Repair</a></td>	
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Agriculture/Forestry/Fishing">Agriculture/Forestry/Fishing</a></td>
        <td width="50%" bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Insurance">Insurance</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Architectural Services">Architectural Services</a></td>
				<td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Internet/E-Commerce">Internet/E-Commerce</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Arts, Entertainment, and Media">Arts, Entertainment, and Media</a></td>
				<td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Law Enforcement and Security">Law Enforcement and Security</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Banking">Banking</a></td>
				<td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Legal">Legal</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Biotechnology and Pharmaceutical">Biotechnology and Pharmaceutical</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Manufacturing and Production">Manufacturing and Production</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Community, Social Services, and Nonprofit">Community, Social Services, and Nonprofit</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Marketing">Marketing</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Computers, Hardware">Computers, Hardware</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Military">Military</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Computers, Software">Computers, Software</a></td>
				<td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Other">Other</a></td>        
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Construction, Mining and Trades">Construction, Mining and Trades</a></td>
				<td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Nutrition, Dietary">Nutrition, Dietary</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Consulting Services">Consulting Services</a></td>
				<td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Practitioner, and Technician">Practitioner, and Technician</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Customer Service and Call Center">Customer Service and Call Center</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Personal Care and Services">Personal Care and Services</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Education, Training, and Library">Education, Training, and Library</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Real Estate">Real Estate</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Employment Placement Agencies">Employment Placement Agencies</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Restaurant and Food Service">Restaurant and Food Service</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Engineering">Engineering</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Retail/Wholesale">Retail/Wholesale</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Executive Management">Executive Management</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Sales">Sales</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Finance/Economics">Finance/Economics</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Science">Science</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Financial Services">Financial Services</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Sports/Recreation">Sports/Recreation</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Government and Policy">Government and Policy</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Telecommunications">Telecommunications</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Healthcare">Healthcare</a></td>
        <td bgcolor="#FFFFFF"><a class="TN2" href="JobSearch3.php?JobCategory=Transportation and Warehousing">Transportation and Warehousing</a></td>
      </tr>
      <tr>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Human Resources">Human Resources</a></td>
        <td class="row2"><a class="TN2" href="JobSearch3.php?JobCategory=Wellness, Fitness, Medi-Spa">Wellness, Fitness, Medi-Spa</a></td>
      </tr>

</table>

<? include_once('../footer.php'); ?>